<!-- 会员信息表表单弹窗 -->
<form id="member-form" lay-filter="member-form" class="layui-form model-form" style="overflow:auto; height:500px;width:90%;">
    <input name="id" type="hidden"/>
    				    <div class="layui-form-item">
        <label class="layui-form-label">发展人</label>
        <div class="layui-input-block">
            <input name="parentId" placeholder="请输入发展人" type="hidden" class="layui-input" maxlength="20"  id="parentId"
                   lay-verify="required" required/>
            <input name="parentName" placeholder="请输入发展人" type="text" class="layui-input" maxlength="20"  id="parentName"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-block">
            <input name="name" placeholder="请输入姓名" type="text" class="layui-input" maxlength="20"  id="name"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">昵称</label>
        <div class="layui-input-block">
            <input name="nickname" placeholder="请输入昵称" type="text" class="layui-input" maxlength="20"  id="nickname"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block">
            <!--<input name="sex" placeholder="请输入性别" type="text" class="layui-input" maxlength="20"  id="sex"-->
                   <!--lay-verify="required" required/>-->
            <input type="radio" name="sex" value="1" title="男" checked>
            <input type="radio" name="sex" value="2" title="女">
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">年龄</label>
        <div class="layui-input-block">
            <input name="age" placeholder="请输入年龄" type="text" class="layui-input" maxlength="20"  id="age"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">是否大师</label>
        <div class="layui-input-block">
            <!--<input name="isTeacher" placeholder="请输入是否大师，0-不是，1-是" type="text" class="layui-input" maxlength="20"  id="isTeacher"-->
                   <!--lay-verify="required" required/>-->
            <input type="radio" name="isTeacher" value="1" title="是" checked>
            <input type="radio" name="isTeacher" value="0" title="否">
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">老师ID</label>
        <div class="layui-input-block">
            <input name="teacherId" placeholder="请输入老师ID，如果是" type="text" class="layui-input" maxlength="20"  id="teacherId"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">职称等头衔</label>
        <div class="layui-input-block">
            <input name="summary" placeholder="请输入职称等头衔" type="text" class="layui-input" maxlength="20"  id="summary"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">简介</label>
        <div class="layui-input-block">
            <input name="introduction" placeholder="请输入简介" type="text" class="layui-input" maxlength="20"  id="introduction"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">电话</label>
        <div class="layui-input-block">
            <input name="phone" placeholder="请输入电话" type="text" class="layui-input" maxlength="20"  id="phone"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">从业年限</label>
        <div class="layui-input-block">
            <input name="careerYears" placeholder="请输入从业年限" type="text" class="layui-input" maxlength="20"  id="careerYears"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">从业领域</label>
        <div class="layui-input-block">
            <input name="careerFields" placeholder="请输入从业领域" type="text" class="layui-input" maxlength="20"  id="careerFields"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">国家</label>
        <div class="layui-input-block">
            <input name="country" placeholder="请输入国家" type="text" class="layui-input" maxlength="20"  id="country"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">省份</label>
        <div class="layui-input-block">
            <input name="province" placeholder="请输入省份" type="text" class="layui-input" maxlength="20"  id="province"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">城市</label>
        <div class="layui-input-block">
            <input name="city" placeholder="请输入城市" type="text" class="layui-input" maxlength="20"  id="city"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">头像</label>
        <div class="layui-input-block">
            <!--<input name="headimgurl" placeholder="请输入头像" type="text" class="layui-input" maxlength="20"  id="headimgurl"-->
                   <!--lay-verify="required" required/>-->
            <img id="uploadimgH" src="" width="100" />
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">OPENID</label>
        <div class="layui-input-block">
            <input name="openid" placeholder="请输入OPENID" type="text" class="layui-input" maxlength="20"  id="openid"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">union-id</label>
        <div class="layui-input-block">
            <input name="unionid" placeholder="请输入union-id" type="text" class="layui-input" maxlength="20"  id="unionid"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <!--<input name="status" placeholder="请输入状态" type="text" class="layui-input" maxlength="20"  id="status"-->
                   <!--lay-verify="required" required/>-->
            <input name="strStatus" placeholder="请输入状态" type="text" class="layui-input" maxlength="20"  id="strStatus"
            lay-verify="required"  readonly required/>
 </div>
</div>
      <div class="layui-form-item">
 <label class="layui-form-label">商家ID</label>
 <div class="layui-input-block">
     <input name="businessId" placeholder="请输入商家ID" type="hidden" class="layui-input" maxlength="20"  id="businessId"
            lay-verify="required" required/>
     <input name="businessName" placeholder="请输入商家ID" type="text" class="layui-input" maxlength="20"  id="businessName"
            lay-verify="required" readonly required/>
 </div>
</div>
      <div class="layui-form-item">
 <label class="layui-form-label">推荐码</label>
 <div class="layui-input-block">
     <input name="referralCode" placeholder="请输入推荐码" type="text" class="layui-input" maxlength="20"  id="referralCode"
            lay-verify="required" readonly required/>
 </div>
</div>
      <div class="layui-form-item">
 <label class="layui-form-label">特权信息</label>
 <div class="layui-input-block">
     <input name="privilege" placeholder="请输入特权信息" type="text" class="layui-input" maxlength="20"  id="privilege"
            lay-verify="required" readonly required/>
 </div>
</div>
      <div class="layui-form-item">
 <label class="layui-form-label">个人标签</label>
 <div class="layui-input-block">
     <input name="tags" placeholder="请输入个人标签" type="text" class="layui-input" maxlength="20"  id="tags"
            lay-verify="required" readonly required/>
 </div>
</div>
      <div class="layui-form-item">
 <label class="layui-form-label">评价得分</label>
 <div class="layui-input-block">
     <input name="evalScore" placeholder="请输入评价得分" type="text" class="layui-input" maxlength="20"  id="evalScore"
            lay-verify="required" readonly required/>
 </div>
</div>
      <div class="layui-form-item">
 <label class="layui-form-label">评价人数</label>
 <div class="layui-input-block">
     <input name="evalPeoplenum" placeholder="请输入评价人数" type="text" class="layui-input" maxlength="20"  id="evalPeoplenum"
            lay-verify="required" readonly required/>
 </div>
</div>
      <div class="layui-form-item">
 <label class="layui-form-label">咨询人数</label>
 <div class="layui-input-block">
     <input name="askPeoplenum" placeholder="请输入咨询人数" type="text" class="layui-input" maxlength="20"  id="askPeoplenum"
            lay-verify="required" readonly required/>
 </div>
</div>
      <div class="layui-form-item">
 <label class="layui-form-label">创建日期</label>
 <div class="layui-input-block">
     <input name="createDate" placeholder="请输入创建日期" type="text" class="layui-input" maxlength="20"  id="createDate"
            lay-verify="required" readonly required/>
 </div>
</div>
      <div class="layui-form-item">
 <label class="layui-form-label">更新日期</label>
 <div class="layui-input-block">
     <input name="updateDate" placeholder="请输入更新日期" type="text" class="layui-input" maxlength="20"  id="updateDate"
            lay-verify="required" readonly required/>
 </div>
</div>
<div class="layui-form-item model-form-footer">
 <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
 <button class="layui-btn" lay-filter="user-form-submit" lay-submit>保存</button>
</div>
</form>

<script>
layui.use(['layer', 'admin', 'form', 'formSelects'], function () {
 var layer = layui.layer;
 var admin = layui.admin;
 var form = layui.form;
 var formSelects = layui.formSelects;

 var member = admin.getTempData('t_member');
    if (member.method=="update"){
        $("#uploadimgH").attr("src",member.headimgurl);
        if(member.status==1){
            member.strStatus="已认证";
        }else{
            member.strStatus="未认证";
        }
     form.val('member-form', member);
     form.render();
 }
 // 表单提交事件
 form.on('submit(user-form-submit)', function (data) {
      layer.load(2);

     admin.req('member/member/'+member.method, JSON.stringify(data.field), function (data) {
         layer.closeAll('loading');
         if (data.code == 0) {
             layer.msg(data.msg, {icon: 1, time: 500});
             admin.finishPopupCenter();
         } else {
             layer.msg(data.msg, {icon: 2, time: 500});
         }
     }, "post");
     return false;
 });
});
</script>
